<script setup lang="ts">
import comeInViewHeader from '@/components/comeInViewHeader.vue';
import ComeInViewNav from '@/components/ComeInViewNav.vue';
import ComeInCompanyProfile from '@/components/ComeInCompanyProfile.vue';
import ComeInDevelopmentHistory from '@/components/ComeInDevelopmentHistory.vue';
import ComeInCorporateCulture from '@/components/ComeInCorporateCulture.vue';
import ComeInImportantNews from '@/components/ComeInImportantNews.vue';
import {ref} from "vue";
var  currentComponent = ref(ComeInCompanyProfile)
const  selectedIndexChange=(index:number)=> {
    if (index == 0)
    {
        currentComponent.value = ComeInCompanyProfile
    }
    if (index == 1)
    {
        currentComponent.value = ComeInDevelopmentHistory
    }
    if (index == 2)
    {
        currentComponent.value = ComeInCorporateCulture
    }
    if (index == 3)
    {
        currentComponent.value = ComeInImportantNews
    }
}
</script>

<template>
  <div class="come-in-view">
    <main>
      <comeInViewHeader/>
      <ComeInViewNav @callBack="selectedIndexChange" />
      <keep-alive>
        <component :is="currentComponent"></component>
      </keep-alive>

    </main>

  </div>
</template>

<style scoped lang="scss">

.come-in-view{
  margin-top: 100px;
}

</style>